<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>修改密码</title>
	<meta name="keywords" content="" />
    <meta name="description" content="LarryCMS Version:1.09" />
	<meta name="Author" content="larry" />
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="Shortcut Icon" href="/favicon.ico" />
	<!-- load css -->
	<link rel="stylesheet" type="text/css" href="/static/common/frame/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/common/css/gobal.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/css/common.css" media="all">
</head>
<body>
<div class="fadeInUp animated addata_box">
	<form class="layui-form layui-form-pane">
		<div class="layui-form-item">
			<label class="layui-form-label">姓名</label>
			<div class="layui-input-block">
				<input type="text" name="name" value="{$admininfo.name}" class="layui-input layui-disabled" disabled="disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><em>*</em>原密码</label>
			<div class="layui-input-block">
				<input type="password" name="oldpassword" lay-verify="required|password" placeholder="请输入原密码" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><em>*</em>新密码</label>
			<div class="layui-input-block">
				<input type="password" name="password" lay-verify="required|password" placeholder="请输入新密码" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><em>*</em>确认密码</label>
			<div class="layui-input-block">
				<input type="password" name="verifypassword" lay-verify="required|password" placeholder="请再次输入新密码" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button type="button" class="layui-btn" lay-submit="" lay-filter="auth">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="/static/common/frame/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript">
    layui.use(['form','layer','jquery'],function(){
        var $ = layui.$,
            form = layui.form,
            layer = layui.layer;
        form.on('submit(auth)', function (data) {
            // 提交到方法 默认为本身
            $.post("{:url('editPw')}",data.field,function(res){
                if(res.code > 0){
                    layer.msg(res.msg,{time:1000,icon:1},function(){
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.tableIns.reload();
                        parent.layer.close(index);
                    });
                }else{
                    layer.msg(res.msg,{time:1000,icon:2});
                }
            });
        });
    });
</script>
</body>
</html>